<?php
function convert_date($date){
	$arr = split('/',$date);
    return $arr[1].'/'.$arr[0].'/'.$arr[2];
}
$datefrom =date('d/m/Y');
if($txt_received_date!='')
$datefrom = $txt_received_date;


	$datefrom_=convert_date($datefrom)." 00:00:00";
	$v_received_date = $datefrom;


$dateto =date('d/m/Y');
if($txt_received_date2!='')
$dateto = $txt_received_date2;

	
	$dateto_=convert_date($dateto)." 23:59:59";
	$v_received_date2 = $dateto;

//echo $datefrom.$dateto;
//exit;
$sql = "Exec Onegate_LoginInfoGetAll_ByDate ";
$sql = $sql."'".$datefrom_;
$sql = $sql."', '".$dateto_;
$sql = $sql."', ".$v_page;
$sql = $sql.", ".$v_limit_row;
//echo $sql;
$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
$arr_all_record = $ado_conn->GetAll($sql);	
$record_count=0;
if($arr_all_record)
	$record_count = count($arr_all_record);
//echo 'record_count='.$record_count;
$sql = "Exec Onegate_CountAllRecordLoginInfo_ByDate ";
$sql = $sql."'".$datefrom_;
$sql = $sql."', '".$dateto_."'";
//echo $sql;
$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
$array_total_record = $ado_conn->GetAll($sql);
$total_record = $array_total_record[0]["TOTAL_RECORD"];
//echo 'total_record='.$total_record;
//var_dump($array_total_record);
?>